<?php
require "class_Index.php";

	class Bin extends Index{
		
	private $tab_name;

		public function into_bin($item_id){
			$upd = "UPDATE store SET bin=1 WHERE id=$item_id";
			mysql_query ($upd, $this->connect);
		}
		
		public function get_quant(){
			$get="SELECT COUNT(bin) AS bin FROM store WHERE bin=1";
			$row=mysql_query($get, $this->connect);
			$quant = mysql_fetch_array($row, MYSQL_ASSOC);
			mysql_free_result($row);																				
			return $quant = $quant['bin'];
		}

		public function exc_bin($exc){
			$upd="UPDATE store SET bin=0 WHERE id=$exc";
			mysql_query($upd, $this->connect);
		}

		public function clear(){
			$upd="UPDATE store SET bin=0";
			mysql_query($upd, $this->connect);
		}
	}
?>